Integrand size = 21, antiderivative size = 211 \[ \int \frac {d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx=-\frac {2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac {b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac {\left (2 b^4 d-12 a b^2 c d+12 a^2 c^2 d-a b^3 e+6 a^2 b c e\right ) \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^3 \left (b^2-4 a c\right )^{3/2}}-\frac {(2 b d-a e) \log (x)}{a^3}+\frac {(2 b d-a e) \log \left (a+b x+c x^2\right )}{2 a^3} \]
[Out]
Time = 0.26 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {836, 814, 648, 632, 212, 642} \[ \int \frac {d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx=\frac {(2 b d-a e) \log \left (a+b x+c x^2\right )}{2 a^3}-\frac {\log (x) (2 b d-a e)}{a^3}-\frac {-a b e-6 a c d+2 b^2 d}{a^2 x \left (b^2-4 a c\right )}-\frac {\text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right ) \left (6 a^2 b c e+12 a^2 c^2 d-a b^3 e-12 a b^2 c d+2 b^4 d\right )}{a^3 \left (b^2-4 a c\right )^{3/2}}+\frac {c x (b d-2 a e)-a b e-2 a c d+b^2 d}{a x \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )} \]
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 814
Rule 836
Rubi steps \begin{align*} \text {integral}& = \frac {b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac {\int \frac {-2 b^2 d+6 a c d+a b e-2 c (b d-2 a e) x}{x^2 \left (a+b x+c x^2\right )} \, dx}{a \left (b^2-4 a c\right )} \\ & = \frac {b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac {\int \left (\frac {-2 b^2 d+6 a c d+a b e}{a x^2}+\frac {\left (-b^2+4 a c\right ) (-2 b d+a e)}{a^2 x}+\frac {-2 b^4 d+10 a b^2 c d-6 a^2 c^2 d+a b^3 e-5 a^2 b c e-c \left (b^2-4 a c\right ) (2 b d-a e) x}{a^2 \left (a+b x+c x^2\right )}\right ) \, dx}{a \left (b^2-4 a c\right )} \\ & = -\frac {2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac {b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac {(2 b d-a e) \log (x)}{a^3}-\frac {\int \frac {-2 b^4 d+10 a b^2 c d-6 a^2 c^2 d+a b^3 e-5 a^2 b c e-c \left (b^2-4 a c\right ) (2 b d-a e) x}{a+b x+c x^2} \, dx}{a^3 \left (b^2-4 a c\right )} \\ & = -\frac {2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac {b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac {(2 b d-a e) \log (x)}{a^3}+\frac {(2 b d-a e) \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 a^3}+\frac {\left (2 b^4 d-12 a b^2 c d+12 a^2 c^2 d-a b^3 e+6 a^2 b c e\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 a^3 \left (b^2-4 a c\right )} \\ & = -\frac {2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac {b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac {(2 b d-a e) \log (x)}{a^3}+\frac {(2 b d-a e) \log \left (a+b x+c x^2\right )}{2 a^3}-\frac {\left (2 b^4 d-12 a b^2 c d+12 a^2 c^2 d-a b^3 e+6 a^2 b c e\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^3 \left (b^2-4 a c\right )} \\ & = -\frac {2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac {b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac {\left (2 b^4 d-12 a b^2 c d+12 a^2 c^2 d-a b^3 e+6 a^2 b c e\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^3 \left (b^2-4 a c\right )^{3/2}}-\frac {(2 b d-a e) \log (x)}{a^3}+\frac {(2 b d-a e) \log \left (a+b x+c x^2\right )}{2 a^3} \\ \end{align*}
Time = 0.22 (sec) , antiderivative size = 192, normalized size of antiderivative = 0.91 \[ \int \frac {d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx=\frac {-\frac {2 a d}{x}-\frac {2 a \left (b^3 d+2 a c (a e-c d x)+b^2 (-a e+c d x)-a b c (3 d+e x)\right )}{\left (b^2-4 a c\right ) (a+x (b+c x))}-\frac {2 \left (2 b^4 d-12 a b^2 c d+12 a^2 c^2 d-a b^3 e+6 a^2 b c e\right ) \arctan \left (\frac {b+2 c x}{\sqrt {-b^2+4 a c}}\right )}{\left (-b^2+4 a c\right )^{3/2}}+2 (-2 b d+a e) \log (x)+(2 b d-a e) \log (a+x (b+c x))}{2 a^3} \]
[In]
[Out]
Time = 0.21 (sec) , antiderivative size = 293, normalized size of antiderivative = 1.39
method | result | size |
default | \(-\frac {d}{a^{2} x}+\frac {\left (a e -2 b d \right ) \ln \left (x \right )}{a^{3}}-\frac {\frac {\frac {a c \left (a b e +2 a c d -b^{2} d \right ) x}{4 a c -b^{2}}-\frac {a \left (2 a^{2} c e -a \,b^{2} e -3 a b c d +d \,b^{3}\right )}{4 a c -b^{2}}}{c \,x^{2}+b x +a}+\frac {\frac {\left (4 a^{2} c^{2} e -a \,b^{2} c e -8 a b \,c^{2} d +2 b^{3} c d \right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (5 a^{2} b c e +6 a^{2} c^{2} d -a \,b^{3} e -10 a \,b^{2} c d +2 d \,b^{4}-\frac {\left (4 a^{2} c^{2} e -a \,b^{2} c e -8 a b \,c^{2} d +2 b^{3} c d \right ) b}{2 c}\right ) \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{4 a c -b^{2}}}{a^{3}}\) | \(293\) |
risch | \(\frac {-\frac {c \left (a b e +6 a c d -2 b^{2} d \right ) x^{2}}{a^{2} \left (4 a c -b^{2}\right )}+\frac {\left (2 a^{2} c e -a \,b^{2} e -7 a b c d +2 d \,b^{3}\right ) x}{\left (4 a c -b^{2}\right ) a^{2}}-\frac {d}{a}}{x \left (c \,x^{2}+b x +a \right )}+\frac {e \ln \left (x \right )}{a^{2}}-\frac {2 \ln \left (x \right ) b d}{a^{3}}+\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (64 a^{6} c^{3}-48 a^{5} b^{2} c^{2}+12 a^{4} b^{4} c -a^{3} b^{6}\right ) \textit {\_Z}^{2}+\left (64 c^{3} e \,a^{4}-48 a^{3} b^{2} c^{2} e -128 a^{3} b \,c^{3} d +12 a^{2} b^{4} c e +96 a^{2} b^{3} c^{2} d -a \,b^{6} e -24 a \,b^{5} c d +2 d \,b^{7}\right ) \textit {\_Z} +16 a^{2} c^{3} e^{2}-3 a \,b^{2} c^{2} e^{2}-28 a b \,c^{3} d e +36 a \,c^{4} d^{2}+6 b^{3} c^{2} d e -8 b^{2} c^{3} d^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (96 a^{7} c^{3}-80 a^{6} b^{2} c^{2}+22 a^{5} b^{4} c -2 a^{4} b^{6}\right ) \textit {\_R}^{2}+\left (48 a^{5} c^{3} e -20 a^{4} b^{2} c^{2} e -72 a^{4} b \,c^{3} d +2 a^{3} b^{4} c e +34 a^{3} b^{3} c^{2} d -4 a^{2} b^{5} c d \right ) \textit {\_R} +a^{2} b^{2} c^{2} e^{2}+12 a^{2} b \,c^{3} d e +36 a^{2} c^{4} d^{2}-4 a \,b^{3} c^{2} d e -24 a \,b^{2} c^{3} d^{2}+4 b^{4} c^{2} d^{2}\right ) x +\left (-16 a^{7} b \,c^{2}+8 a^{6} b^{3} c -a^{5} b^{5}\right ) \textit {\_R}^{2}+\left (20 a^{5} b \,c^{2} e +24 a^{5} c^{3} d -9 a^{4} b^{3} c e -46 a^{4} b^{2} c^{2} d +a^{3} b^{5} e +18 a^{3} b^{4} c d -2 a^{2} b^{6} d \right ) \textit {\_R} -4 a^{3} b \,c^{2} e^{2}-24 a^{3} c^{3} d e +a^{2} b^{3} c \,e^{2}+22 a^{2} b^{2} c^{2} d e +48 a^{2} b \,c^{3} d^{2}-4 a \,b^{4} c d e -28 a \,b^{3} c^{2} d^{2}+4 b^{5} c \,d^{2}\right )\right )\) | \(680\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 798 vs. \(2 (205) = 410\).
Time = 1.35 (sec) , antiderivative size = 1615, normalized size of antiderivative = 7.65 \[ \int \frac {d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx=\text {Too large to display} \]
[In]
[Out]
Timed out. \[ \int \frac {d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx=\text {Timed out} \]
[In]
[Out]
Exception generated. \[ \int \frac {d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 238, normalized size of antiderivative = 1.13 \[ \int \frac {d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx=\frac {{\left (2 \, b^{4} d - 12 \, a b^{2} c d + 12 \, a^{2} c^{2} d - a b^{3} e + 6 \, a^{2} b c e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} \sqrt {-b^{2} + 4 \, a c}} - \frac {2 \, b^{2} c d x^{2} - 6 \, a c^{2} d x^{2} - a b c e x^{2} + 2 \, b^{3} d x - 7 \, a b c d x - a b^{2} e x + 2 \, a^{2} c e x + a b^{2} d - 4 \, a^{2} c d}{{\left (a^{2} b^{2} - 4 \, a^{3} c\right )} {\left (c x^{3} + b x^{2} + a x\right )}} + \frac {{\left (2 \, b d - a e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, a^{3}} - \frac {{\left (2 \, b d - a e\right )} \log \left ({\left | x \right |}\right )}{a^{3}} \]
[In]
[Out]
Time = 11.77 (sec) , antiderivative size = 1366, normalized size of antiderivative = 6.47 \[ \int \frac {d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx=\ln \left (96\,a^5\,c^3\,e-2\,a^2\,b^6\,e+4\,a\,b^7\,d+4\,b^8\,d\,x+174\,a^3\,b^3\,c^2\,d-2\,a^2\,b^3\,e\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+6\,a^3\,c^2\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-84\,a^4\,b^2\,c^2\,e-2\,a\,b^7\,e\,x+4\,a\,b^4\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-46\,a^2\,b^5\,c\,d-216\,a^4\,b\,c^3\,d+23\,a^3\,b^4\,c\,e+48\,a^4\,c^4\,d\,x+4\,b^5\,d\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+9\,a^3\,b\,c\,e\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-2\,a\,b^4\,e\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+24\,a^2\,b^5\,c\,e\,x+120\,a^4\,b\,c^3\,e\,x-18\,a^2\,b^2\,c\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+194\,a^2\,b^4\,c^2\,d\,x-276\,a^3\,b^2\,c^3\,d\,x-94\,a^3\,b^3\,c^2\,e\,x-12\,a^3\,c^2\,e\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-48\,a\,b^6\,c\,d\,x-24\,a\,b^3\,c\,d\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+30\,a^2\,b\,c^2\,d\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+12\,a^2\,b^2\,c\,e\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}\right )\,\left (\frac {b^4\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+6\,a^2\,c^2\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-\frac {a\,b^3\,e\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}}{2}-6\,a\,b^2\,c\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+3\,a^2\,b\,c\,e\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}}{-64\,a^6\,c^3+48\,a^5\,b^2\,c^2-12\,a^4\,b^4\,c+a^3\,b^6}-\frac {e}{2\,a^2}+\frac {b\,d}{a^3}\right )-\ln \left (2\,a^2\,b^6\,e-96\,a^5\,c^3\,e-4\,a\,b^7\,d-4\,b^8\,d\,x-174\,a^3\,b^3\,c^2\,d-2\,a^2\,b^3\,e\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+6\,a^3\,c^2\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+84\,a^4\,b^2\,c^2\,e+2\,a\,b^7\,e\,x+4\,a\,b^4\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+46\,a^2\,b^5\,c\,d+216\,a^4\,b\,c^3\,d-23\,a^3\,b^4\,c\,e-48\,a^4\,c^4\,d\,x+4\,b^5\,d\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+9\,a^3\,b\,c\,e\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-2\,a\,b^4\,e\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-24\,a^2\,b^5\,c\,e\,x-120\,a^4\,b\,c^3\,e\,x-18\,a^2\,b^2\,c\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-194\,a^2\,b^4\,c^2\,d\,x+276\,a^3\,b^2\,c^3\,d\,x+94\,a^3\,b^3\,c^2\,e\,x-12\,a^3\,c^2\,e\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+48\,a\,b^6\,c\,d\,x-24\,a\,b^3\,c\,d\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+30\,a^2\,b\,c^2\,d\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+12\,a^2\,b^2\,c\,e\,x\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}\right )\,\left (\frac {b^4\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+6\,a^2\,c^2\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}-\frac {a\,b^3\,e\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}}{2}-6\,a\,b^2\,c\,d\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}+3\,a^2\,b\,c\,e\,\sqrt {-{\left (4\,a\,c-b^2\right )}^3}}{-64\,a^6\,c^3+48\,a^5\,b^2\,c^2-12\,a^4\,b^4\,c+a^3\,b^6}+\frac {e}{2\,a^2}-\frac {b\,d}{a^3}\right )-\frac {\frac {d}{a}-\frac {x\,\left (2\,c\,e\,a^2-e\,a\,b^2-7\,c\,d\,a\,b+2\,d\,b^3\right )}{a^2\,\left (4\,a\,c-b^2\right )}+\frac {c\,x^2\,\left (-2\,d\,b^2+a\,e\,b+6\,a\,c\,d\right )}{a^2\,\left (4\,a\,c-b^2\right )}}{c\,x^3+b\,x^2+a\,x}+\frac {\ln \left (x\right )\,\left (a\,e-2\,b\,d\right )}{a^3} \]
[In]
[Out]